import Vue from 'vue'
import Router from 'vue-router'
import Dashboard from '@/components/index/dashboard/Dashboard'
import Panel from '@/components/index/panel/Panel'
import Tab from '@/components/index/tab/Tab'
import Modal from '@/components/index/modal/Modal'
import Table from '@/components/index/table/Table'
import Form from '@/components/index/form/Form'
import Tree from '@/components/index/tree/Tree'
import UserAdd from '@/components/index/user/UserAdd'
import UserDetail from '@/components/index/user/UserDetail'
import UserInfo from '@/components/index/user/UserInfo'
import UserTable from '@/components/index/user/UserTable'
import AddressTable from '@/components/index/address/AddressTable'
import SupplierTable from '@/components/index/supplier/SupplierTable'
import SupplierAdd from '@/components/index/supplier/SupplierAdd'
import SupplierInfo from '@/components/index/supplier/SupplierInfo'
/* 商品分类管理 */
import CommodityClass from '@/components/index/commodityClass/CommodityClass'
/* 商品管理 */
import CommodityManage from '@/components/index/commodityManage/commodityManageTable'
import CommodityManageAdd from '@/components/index/commodityManage/commodityManageAdd'
import CommodityManageInfo from '@/components/index/commodityManage/commodityManageInfo'
/* 单计量单位管理 */
import UnitsTable from '@/components/index/units/UnitsTable'
import UnitsAdd from '@/components/index/units/UnitsAdd'
import UnitsInfo from '@/components/index/units/UnitsInfo'
/* 多计量单位管理 */
import MunitsTable from '@/components/index/units/MunitsTable'
import MunitsAdd from '@/components/index/units/MunitsAdd'
import MunitsInfo from '@/components/index/units/MunitsInfo'
/* 仓库管理 */
import StoreTable from '@/components/index/store/StoreTable'
import StoreAdd from '@/components/index/store/StoreAdd'
import StoreInfo from '@/components/index/store/StoreInfo'
/** 审批管理 */
import AuditTable from '@/components/index/audit/AuditManageTable'
/* 采购进货管理 */
import BuyInTable from '@/components/index/buyin/BuyInTable'
import BuyInAdd from '@/components/index/buyin/BuyInAdd'
import BuyInInfo from '@/components/index/buyin/BuyInInfo'
/** 入库管理 */
import StorageTable from '@/components/index/storage/StorageManageTable'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Dashboard',
      component: Dashboard
    }, {
      path: '/panel',
      name: 'Panel',
      component: Panel
    }, {
      path: '/tab',
      name: 'Tab',
      component: Tab
    }, {
      path: '/modal',
      name: 'Modal',
      component: Modal
    }, {
      path: '/table',
      name: 'Table',
      component: Table
    }, {
      path: '/form',
      name: 'Form',
      component: Form
    }, {
      path: '/tree',
      name: 'Tree',
      component: Tree
    },
    // user module
    {
      path: '/users',
      name: 'Users',
      component: UserTable
    }, {
      path: '/useradd',
      name: 'UserAdd',
      component: UserAdd
    }, {
      path: '/userinfo',
      name: 'UserInfo',
      component: UserInfo
    }, {
      path: '/userdetail',
      name: 'UserDetail',
      component: UserDetail
    },
    // address
    {
      path: '/address',
      name: 'Address',
      component: AddressTable
    },
    // supplier
    {
      path: '/supplier',
      name: 'Supplier',
      component: SupplierTable
    }, {
      path: '/supplierAdd',
      name: 'SupplierAdd',
      component: SupplierAdd
    }, {
      path: '/supplierInfo',
      name: 'SupplierInfo',
      component: SupplierInfo
    },
    // 商品分类
    {
      path: '/commodityclass',
      name: 'CommodityClass',
      component: CommodityClass
    },
    // 商品管理
    {
      path: '/commodityManage',
      name: 'CommodityManage',
      component: CommodityManage
    }, {
      path: '/commodityManageAdd',
      name: 'CommodityManageAdd',
      component: CommodityManageAdd
    }, {
      path: '/commodityManageInfo',
      name: 'CommodityManageInfo',
      component: CommodityManageInfo
    },
    // units
    {
      path: '/units',
      name: 'Units',
      component: UnitsTable
    }, {
      path: '/unitsadd',
      name: 'UnitsAdd',
      component: UnitsAdd
    }, {
      path: '/unitsinfo',
      name: 'UnitsInfo',
      component: UnitsInfo
    },
    // munits
    {
      path: '/munits',
      name: 'Munits',
      component: MunitsTable
    }, {
      path: '/munitsadd',
      name: 'munitsAdd',
      component: MunitsAdd
    }, {
      path: '/munitsinfo',
      name: 'MunitsInfo',
      component: MunitsInfo
    },
    // 仓库管理
    {
      path: '/storeManage',
      name: 'StoreTable',
      component: StoreTable
    },
    {
      path: '/storeManageAdd',
      name: 'StoreAdd',
      component: StoreAdd
    },
    {
      path: '/storeManageInfo',
      name: 'StoreInfo',
      component: StoreInfo
    },
    // 审批管理
    {
      path: '/auditManage',
      name: 'AuditTable',
      component: AuditTable
    },
    // 采购进货
    {
      path: '/buyIn',
      name: 'BuyInTable',
      component: BuyInTable
    }, {
      path: '/buyInAdd',
      name: 'BuyInAdd',
      component: BuyInAdd
    }, {
      path: '/buyInInfo',
      name: 'BuyInInfo',
      component: BuyInInfo
    },
    // 入库管理
    {
      path: '/storageManage',
      name: 'StorageTable',
      component: StorageTable
    }
  ]
})
